// import Vue from 'vue'
// import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
//
// Vue.use(Router)
//
// export default new Router({
//   mode: 'history',
//   routes: [
//     {
//       path: '/',
//       name: 'HelloWorld',
//       component: HelloWorld
//     }
//   ]
// })

// 配置routes
// import dashboard from '../pages/dashboard'
// import login from '../pages/login'
// import app from '../App'
// 路由懒加载
const app = () => import('../App')
const login = () => import('../pages/login')
const dashboard = () => import('../pages/dashboard')
const NotFoundView = () => import('../components/404.vue')
const resetPwd = () => import('../pages/resetPwd')

const routes = [
  {path: '/login', component: login},
  {
    path: '/test',
    component: app,
    children: [
      {path: '*', component: NotFoundView}
    ]
  },
  {
    path: '',
    component: app,
    children: [
      {path: '/index', component: dashboard},
      {path: '/resetPwd', component: resetPwd}
    ]
  },
  {path: '*', component: NotFoundView}
]

export default routes
